#include "executelogdetaildlg.h"
#include "ui_executelogdetaildlg.h"

ExecuteLogDetailDlg::ExecuteLogDetailDlg(JobLog log,QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::ExecuteLogDetailDlg)
{
    ui->setupUi(this);
    setWindowIcon(QIcon(":/image/res/stm.jpg"));

    this->log = log;
    init();
}

ExecuteLogDetailDlg::~ExecuteLogDetailDlg()
{
    delete ui;
}

void ExecuteLogDetailDlg::init()
{
    ui->label_logNum->setText(QString::number(log.jobLogId));
    ui->label_jobGroup->setText(log.jobGroup);
    ui->label_jobName->setText(log.jobName);
    ui->label_executeTime->setText(log.createTime);
    ui->label_invokeTargetMethod->setText(log.invokeTarget);
    ui->label_logMsg->setText(log.jobMessage);
    ui->label_executeStatus->setText(log.status == "0" ? "正常" : "失败");
}

void ExecuteLogDetailDlg::on_btn_close_clicked()
{
    close();
}

